#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1005;

int n, m;
char a[N][N];
bool check(int t, int b, int l, int r) {
  rep(i, t, b) rep(j, l, r) if (a[i][j] == '.') return false;
  return true;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  rep(i, 1, n) rep(j, 1, m) cin >> a[i][j];
  int t = n, b = 1, l = m, r = 1;
  rep(i, 1, n) rep(j, 1, m) {
    if (a[i][j] == '#') {
      t = min(t, i);
      b = max(b, i);
      l = min(l, j);
      r = max(r, j);
    }
  }
  bool res = check(t, b, l, r);
  cout << (res ? "Yes" : "No");
  return 0;
}